<me:UIBABST x:Class="WPFExcelReport.TBZ02"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"   
                    xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
                    xmlns:me="clr-namespace:WPFExcelReport"  
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                    xmlns:BM="clr-namespace:WPFExcelReport;assembly=TBABST" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"    
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"  
                    x:Name="TV"
                    Background="White"    
                    Loaded="Window_Loaded"
     >
    <me:UIBABST.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </me:UIBABST.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
        </Grid.RowDefinitions> 
        <StackPanel >
            <WrapPanel>
                <Button Content="{Binding Source={Localization:Translate Word=留位}}" Click="NewCommand"/>
                <Button Content="{Binding Source={Localization:Translate Word=取消留位}}" Click="DeleteCommand" />
            </WrapPanel>
        </StackPanel>
        <DataGrid  Grid.Row="1"  
                   VerticalAlignment="Top"  
                   AutoGenerateColumns="False"
                   EnableRowVirtualization="False"
                   VerticalScrollBarVisibility="Auto"
                   HorizontalScrollBarVisibility="Auto"
                   HeadersVisibility="Column"
                   Name="dlgMaster"
                   ItemsSource="{Binding Source={StaticResource vwMaster}}" 
                   IsSynchronizedWithCurrentItem="True" 
                    > 
            <DataGrid.Columns> 
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=库}}" Binding="{Binding BMLO}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=库区}}" Binding="{Binding BMLB}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=库位}}" Binding="{Binding BMLP}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=品种}}" Binding="{Binding BMKART}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=色号}}" Binding="{Binding BMFARBE}" Width="Auto"/> 
                <DataGridTextColumn Binding="{Binding BMBAUMKRS}"   Width="Auto" />
                <DataGridTextColumn Binding="{Binding BMBAUMLFD}"  Header="{Binding Source={Localization:Translate Word=轴号}}" Width="Auto" />
                <DataGridTextColumn Binding="{Binding BMKETTTYP}"  Header="{Binding Source={Localization:Translate Word=类型}}" Width="Auto" />
                <DataGridTextColumn Binding="{Binding BMSOLLLG,Converter={StaticResource d10}}"  Header="{Binding Source={Localization:Translate Word=目标长度}}" Width="Auto" />
                <DataGridTextColumn Binding="{Binding BMRESTLG,Converter={StaticResource d10}}"  Header="{Binding Source={Localization:Translate Word=余长度}}" Width="Auto" />
                <DataGridTextColumn Binding="{Binding BMRESTGEW,Converter={StaticResource d10}}"  Header="{Binding Source={Localization:Translate Word=余重}}" Width="Auto" />
            </DataGrid.Columns>
        </DataGrid  >
    </Grid>

</me:UIBABST>
